package com.cloud.user.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.cloud.user.model.User;
import com.cloud.user.service.UserService;

@RestController
public class UserController {

	@Autowired
	private UserService userService;
	
	
	@RequestMapping(value = "/user", method = RequestMethod.GET)
	public User find(String id) {
		return userService.find(id);
	}

	@RequestMapping(value = "/users?ids={id}", method = RequestMethod.GET)
	public List<User> find(String[] ids) {
		return userService.findAll(ids);
	}
}
